package chixing.day12.generic;

import chixing.day04.Account;

public class PointTest {
    public <T> void fun1(T x, T y){
        System.out.println(x);
        System.out.println(y);
    }
    public static void main(String[] args) {

     Point<Integer> point1 = new Point<>();//菱形语法
     point1.setX(100);
     point1.setY(200);
        Point<Float> point2 = new Point<>();
        point2.setY(55.4f);
        point2.setY(88.2f);
     Point<String> point3 = new Point<>("hello","world");
    }
    // 通配符 ，可以匹配任意类型
    public static void test(Point<?> point){
    }
    //是Account的子类
    public static void test2(Point<? extends Account> point){

    }
}
